<template>
  <div>



      <van-nav-bar left-arrow>
        <template #right>
           搜索
        </template>
        <template #title>
        </template>
        <template #left>
           康德
        </template>
      </van-nav-bar>


      <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
        <van-swipe-item>1</van-swipe-item>
        <van-swipe-item>2</van-swipe-item>
        <van-swipe-item>3</van-swipe-item>
        <van-swipe-item>4</van-swipe-item>
      </van-swipe>



<div class="main_">

    <div class="zuo">
        <van-sidebar v-model="activeKey">
          <van-sidebar-item title="咖啡" to='KaFei' />
          <van-sidebar-item title="经典" to='JingDian' />
        </van-sidebar>
    </div>

    <div class="you">
        <router-view></router-view>
    </div>

</div>

      


  </div>
</template>

<script>
import Vue from 'vue';
import { NavBar } from 'vant';
import { Swipe, SwipeItem } from 'vant';
import { Sidebar, SidebarItem } from 'vant';

Vue.use(Sidebar);
Vue.use(SidebarItem);

Vue.use(Swipe);
Vue.use(SwipeItem);


Vue.use(NavBar);
export default {

      data() {
         return {
           activeKey: 0,
        //    title:[
        //        '咖啡',
        //        '纳瑞',
        //        '果蔬'
        //    ]
         };
       },

}
</script>

<style>
  .my-swipe .van-swipe-item {
    color: #fff;
    font-size: 20px;
    line-height: 150px;
    text-align: center;
    background-color: #39a9ed;
  }
  .main_{
      width: 100%;
      height: 600px;
      display: flex;
  }
  .zuo{
      width: 30%;
      height: 600px;
  }
  .you{
      width: 70%;
      height: 600px;
  }
</style>